package com.halixun.d2app.net;

import com.halixun.d2app.base.BaseResult;
import com.halixun.d2app.bean.CheckDeviceInfo;
import com.halixun.d2app.bean.ClientUserInfo;
import com.halixun.d2app.bean.FoodCategoryInfo;
import com.halixun.d2app.bean.OrderDetais;
import com.halixun.d2app.bean.OrderListInfo;
import com.halixun.d2app.bean.PayResultInfo;
import com.halixun.d2app.bean.QingDanInfo;

import java.util.List;
import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;

public interface WebRestApi {

    /**
     * 检查此设备是否绑定guid
     *
     * @return
     */
    @POST("/Account/CheckDevice?Sign=da39a3ee5e6b4b0d3255bfef95601890afd80709")
    Call<BaseResult<CheckDeviceInfo>> checkDevice(@QueryMap Map<String, String> map);

    /**
     * 绑定guid
     *
     * @param body
     * @return
     */
    @POST("/Account/BindDevice?Sign=da800626c60cad8b125b10a98cf105da124ac62d")
    Call<BaseResult<String>> bindDevice(@Body RequestBody body, @QueryMap Map<String, String> map);

    /**
     * 登录接口
     *
     * @param body
     * @return
     */
    @POST("/Account/Login?Sign=e2fd41f20b2531dfda253429230d13470a2d2bb8")
    Call<BaseResult<ClientUserInfo>> login(@Body RequestBody body, @QueryMap Map<String, String> map);

    /**
     * 获取首页商品列表
     *
     * @param route
     * @return
     */
    @POST("/Food/GetFoodList?Sign=af5a88e2721303b14f6649ce1d9d87927db65f27")
    Call<BaseResult<List<OrderListInfo>>> getlists(@Body RequestBody route, @QueryMap Map<String, String> map);

    /**
     * 付款码支付
     *
     * @param route
     * @param map
     * @return
     */
    @POST("/Food/Pay?Sign=350a04443874271f48d3a3188388297530c82b84")
    Call<BaseResult<PayResultInfo>> scannerPay(@Body RequestBody route, @QueryMap Map<String, String> map);

    /**
     * 生成订单
     *
     * @param route
     * @return
     */
    @POST("/Food/SaveFoodOrderDetail?Sign=9d33678b9c96aa5cbf2952bb3a5677d96ebd3ceb")
    Call<BaseResult<String>> getorder(@Body RequestBody route, @QueryMap Map<String, String> map);

    /**
     * 现金支付
     *
     * @param route
     * @param map
     * @return
     */
    @POST("/Food/Pay?Sign=1050e93f21ee38e4407c0d06167e0363032742e4")
    Call<BaseResult<String>> cashPay(@Body RequestBody route, @QueryMap Map<String, String> map);

    /**
     * 销售商品报表
     *
     * @return
     */
    @POST("/Food/GetFoodSalesReport?Sign=da39a3ee5e6b4b0d3255bfef95601890afd80709")
    Call<BaseResult<List<QingDanInfo>>> GetFoodSalesReport(@QueryMap Map<String, String> map);

    /**
     * 获取分类
     *
     * @param map
     * @return
     */
    @POST("/Food/GetFoodTypes?Sign=da39a3ee5e6b4b0d3255bfef95601890afd80709")
    Call<BaseResult<List<FoodCategoryInfo>>> getFoodTypes(@QueryMap Map<String, String> map);

    /**
     * 获取订单列表
     * @param route
     * @param map
     * @return
     */
    @POST("/Food/GetOrderList?Sign=8970b8d3beb80b44438f0d311f7181bc957ee129")
    Call<BaseResult<OrderDetais>> getOrderList(@Body RequestBody route , @QueryMap Map<String, String> map);


    /**
     * 退款
     * @param route
     * @param map
     * @return
     */
    @POST("/Food/Refund?Sign=3736c4dc7e990a37c44f33c472ef80252776be5b")
    Call<BaseResult<String>> refund(@Body RequestBody route, @QueryMap Map<String, String> map);
}
